﻿#region Librerias

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

#endregion


namespace ESF.WCF
{
	public static class WCFHelper
	{
		public static T GetHeader <T>(string pName, string pns = "")
		{
			return OperationContext.Current.IncomingMessageHeaders.FindHeader(pName, pns) > -1
				? OperationContext.Current.IncomingMessageHeaders.GetHeader <T>(pName, pns)
				: default(T);
		}

	}
}
